package com.dancw.user.web.basic.controller;

import com.dancw.user.model.basic.BasicUserDTO;
import com.dancw.user.web.basic.fade.UserBasicFade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 但成王
 * @create 2018-11-02 00:30
 */
@Controller
@RequestMapping(value = "/user/web/basic")
public class UserBasicController {

    @Autowired
    private UserBasicFade userBasicFade;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public List<BasicUserDTO> list(@RequestParam(value = "userId") Long userId) {
        return userBasicFade.queryList(userId);
    }
}
